Skip to content

fix: update default maxlen for ScanStorage to 10#961

Merged
wakonig merged 1 commit into
mainfrom
fix/trim_live_data
Jun 17, 2026
Merged

fix: update default maxlen for ScanStorage to 10#961
wakonig merged 1 commit into
mainfrom
fix/trim_live_data

Conversation

@wakonig

@wakonig wakonig commented Jun 16, 2026

Copy link
Copy Markdown
Member

Description

It should be enough to keep the last 10 elements in memory. Everything else can be fetched from the bec history.

Copilot AI review requested due to automatic review settings June 16, 2026 14:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces in-memory retention for ScanStorage by lowering the default maximum number of stored ScanItems, relying on history retrieval for older scans.

Changes:

  • Update ScanStorage default maxlen from 100 to 3.
  • Align the ScanStorage docstring to reflect the new default.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bec_lib/bec_lib/scan_items.py Outdated
Comment thread bec_lib/bec_lib/scan_items.py Outdated
@wakonig wakonig force-pushed the fix/trim_live_data branch from 68bcafe to d30ca08 Compare June 17, 2026 07:27
@wakonig wakonig changed the title fix: update default maxlen for ScanStorage to 3 fix: update default maxlen for ScanStorage to 10 Jun 17, 2026
@wakonig wakonig force-pushed the fix/trim_live_data branch from d30ca08 to 261e17c Compare June 17, 2026 07:28
@wakonig wakonig self-assigned this Jun 17, 2026
@wakonig wakonig requested a review from a team June 17, 2026 07:48
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
bec_lib/bec_lib/scan_items.py 50.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@wakonig wakonig enabled auto-merge (rebase) June 17, 2026 07:52
@wakonig wakonig merged commit 00ff425 into main Jun 17, 2026
36 of 37 checks passed
@wakonig wakonig deleted the fix/trim_live_data branch June 17, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants